import rxAjax from '@/assets/js/ajax.js';

//个人门户定义表 api接口
export const InsPortalUserDefApi = {};

InsPortalUserDefApi.baseUrl = '/api-portal/portal/core/insPortalUserDef';

//保存门户布局数据
InsPortalUserDefApi.saveAll = function (parameter) {
    let url = InsPortalUserDefApi.baseUrl + '/saveAll';
    return rxAjax.postJson(url, parameter);
}

//获取门户布局差异数据(个人布局和原始布局的差异)
InsPortalUserDefApi.getDifferentCols = function (portalId) {
    let url = InsPortalUserDefApi.baseUrl + '/getDifferentCols?portalId=' + portalId;
    return rxAjax.get(url);
}

//删除个人门户布局数据
InsPortalUserDefApi.deleteUserPortalByUserIdAndPortalId = function (portalId) {
    let url = InsPortalUserDefApi.baseUrl + '/deleteUserPortalByUserIdAndPortalId?portalId=' + portalId;
    return rxAjax.get(url);
}

export default InsPortalUserDefApi;

